package top.aicats.blog.BlogManage.model;


import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import java.util.ArrayList;
import java.util.List;

@Entity
public class ChatNode {
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getSay() {
        return say;
    }

    public void setSay(String say) {
        this.say = say;
    }

    public String getNextNodeID() {
        return nextNodeID;
    }

    public void setNextNodeID(String nextNodeID) {
        this.nextNodeID = nextNodeID;
    }

    public List<ChatOption> getChatOptions() {
        return chatOptions;
    }

    public void setChatOptions(List<ChatOption> chatOptions) {
        this.chatOptions = chatOptions;
    }

    @Id
    private String id;

    private String description;

    private String say;

    private String nextNodeID;

    @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
    private List<ChatOption> chatOptions = new ArrayList<>();


}
